﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="list.aspx.vb" Inherits="cricketmania.list" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <p>
        <asp:Button ID="Button2" runat="server" Text="Add new" />
    <br />
</p>
    <p>
        <asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource1">
        <ItemTemplate>
       <a href="List.aspx?Tagname=<%#Eval("TagName")%>">
       <%#Eval("TagName")%>
       </a> | 
         </ItemTemplate>
</asp:Repeater>
<a href="List.aspx">Show all</a>
        <br />
    </p>
<p>
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
        DataKeyNames="ID" AllowSorting="True">
        <Columns>
            <asp:HyperLinkField DataNavigateUrlFormatString="detail.aspx?ID={0}" 
                DataTextField="schedule" DataNavigateUrlFields="ID" />
            <asp:HyperLinkField DataNavigateUrlFields="RelatedWebsites" 
                DataNavigateUrlFormatString="{0}" DataTextField="RelatedWebsites" 
                HeaderText="RelatedWebsites" />
            <asp:BoundField DataField="Results" HeaderText="Results" 
                SortExpression="Results" />
            <asp:BoundField DataField="Ratings" HeaderText="Ratings" 
                SortExpression="Ratings" />
            <asp:ImageField DataImageUrlField="Gallery" HeaderText="Thumbnail">
                <ControlStyle Height="200px" Width="200px" />
            </asp:ImageField>
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="cmSqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:maniaConnectionString %>" 
        ProviderName="<%$ ConnectionStrings:maniaConnectionString.ProviderName %>" 
        SelectCommand="SELECT [ID], [schedule], [Results], [Ratings], [RelatedWebsites], [Gallery] FROM [crick]">
    </asp:SqlDataSource>
</p>
    <asp:SqlDataSource ID="cmSqlDataSource2" runat="server" 
        ConnectionString="<%$ ConnectionStrings:maniaConnectionString %>" 
        ProviderName="<%$ ConnectionStrings:maniaConnectionString.ProviderName %>" 
        
        SelectCommand="SELECT [Results], [TagName], [ID], [schedule], [Ratings], [Gallery], [RelatedWebsites] FROM [crickQueryview] WHERE ([TagName] = ?)">
        <SelectParameters>
            <asp:QueryStringParameter Name="TagName" QueryStringField="TagName" 
                Type="String" />
        </SelectParameters>
    </asp:SqlDataSource>
    <p>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:maniaConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:maniaConnectionString.ProviderName %>" 
            SelectCommand="SELECT [ID], [TagName] FROM [Tags]"></asp:SqlDataSource>
</p>
    <p>
        <asp:TextBox ID="T1" runat="server" Width="277px"></asp:TextBox>
        <asp:Button ID="Button1" runat="server" Text="Tagsearch" />
</p>
<p>
</p>
<p>
</p>
<p>
</p>
</asp:Content>
